<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<title>表单全屏层</title>
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="format-detection" content="telephone=no">
		<link rel="stylesheet" href="../lib/layui/css/layui.css">
		<link rel="stylesheet" href="../css/hp-common.css">
	</head>

	<body>
		<div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
			<ul class="layui-tab-title">
				<li class="layui-this">示例</li>
				<li>说明</li>
			</ul>
			<div class="layui-tab-content" style="height: 100px;">
				<div class="layui-tab-item layui-show">
					<!-- 内容-->
					<div style="width: 800px;">
						<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
							<legend>hp-layui 与你同在</legend>
						</fieldset>

						<blockquote class="layui-elem-quote">想你想说-做你想做-我能!一切皆有可能~~隐无为</blockquote>
						<form class="layui-form">
							<div class="layui-form-item">
								<textarea name="demo" id="demo1" class="layui-hide">
												hp-layui 与你同在
												<img src="../lib/layui/images/face/14.gif" alt="[亲亲]">
												<img src="../lib/layui/images/face/14.gif" alt="[亲亲]">
                 	                            </textarea>
							</div>
							<button class="layui-btn">提交</button>
							<a class="layui-btn" id="getChoose">获取内容</a>
						</form>
					</div>

				</div>
				<div class="layui-tab-item">
					<blockquote class="layui-elem-quote layui-text">
					在原生的edit上 增加 multiple: true 属性 代表是否开启多图
					</blockquote>
                   
                   
				</div>
			</div>
		</div>

		<script src="../lib/layui/layui.js"></script>

		<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
		<script>
			// 配置
			layui.config({
				base: '../hpModules/' // 扩展模块目录
			}).extend({ // 模块别名 
				hpWindow: 'hpComponent/hpWindow',
				hpConfig : 'hpComponent/hpConfig',
				hpLayedit : 'hpComponent/hpLayedit',
			});
			layui.use(['element','hpLayedit'], function() {
				var layedit = layui.hpLayedit,
					$ = layui.jquery;
                      
				//构建一个默认的编辑器
				//var index = layedit.build('demo1');
			    var index = layedit.build('demo1', {
					//hideTool: ['image']
					uploadImage: {
						url: 'json/upload/demoLayEdit.json',
						type: 'post',
						multiple: true
					}
					//,tool: []
					//,height: 100  
				});
				
				
				
				// 获取内容
				getChoose.onclick = function() {
					alert(layedit.getContent(index));
				};
			});
		</script>

	</body>

</html>